<!doctype html>
<html ng-app="myApp">
<head>
  <title>CSS Transition</title>
  <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.6/angular.js"></script>
  <script src="http://code.angularjs.org/1.2.0-rc.2/angular-animate.js"></script>
  <style>
    .animateMe.grown-add,
    .animateMe.grown-remove {
      transition: 2s linear all;
      -webkit-transition: 2s linear all;
      -moz-transition: 2s linear all;
      -o-transition: 2s linear all;
    }
    .grown {font-size: 50px;}
    .animateMe.grown-add {
      font-size: 16px;
    }
    .animateMe.grown-add.grown-add-active {
      font-size: 50px;
    }
    .animateMe.grown-remove {}
    .animateMe.grown-remove.grown-remove-active {
      font-size: 16px;
    }
  </style>
</head>
<body>

  <div ng-init="grow=false"
      ng-controller="HomeController">
    <button ng-click="grow=!grow">Grow</button>
    <div ng-class="{grown:grow}"
        class="animateMe">
      <h2>Grow me</h2>
    </div>
  </div>

  <script>
    angular.module('myApp', ['ngAnimate'])
    .controller('HomeController', function() {
    });
  </script>

</body>
</html>